package cn.pangza.mybatisplus.entity;

public class PageRequest<T> {
    private Integer pageNum;

    private Integer pageSize;

    private T form;

    public Integer getPageNum() {
        if(pageNum == null || pageNum < 0) {
            return 1;
        }
        return pageNum;
    }

    public Integer getPageSize() {
        if(pageSize == null || pageSize < 1 || pageSize > Integer.MAX_VALUE) {
            return 10;
        }
        return pageSize;
    }

    public T getForm() {
        return form;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public void setForm(T form) {
        this.form = form;
    }
}
